<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	
<head>
	<title>My Homework -- 我的小组</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel='stylesheet' type='text/css' media='all' href='__TMPL__Public/css/book.css' />
	<script src="__TMPL__Public/jquery/js/jquery-1.6.2.min.js" type="text/javascript" ></script>
	<script src="__TMPL__Public/jquery/js/jquery-ui-1.8.16.custom.min.js" type="text/javascript" ></script>
	<script type="text/javascript">
			$(function() {
				
				$(".join_group_button").bind('click', function() {
					var group_id = $(this).attr('group_id');
					joinGroup(group_id, this);
				});
			});
			function joinGroup(group_id, button) {

				$.get("__APP__/Group/join", {
					group_id : group_id
				}, function(result) {
					result = JSON.parse(result);
					if(result.status == 1) {
						alert("已加入");
						window.location = "__APP__/Group/myGroup";
					} else {
						alert("您已经是某个小组的成员！");
					}
				});
			}
		</script>
</head>

<body id="threeColLayout" class="home">

	<div id="wrapper">
		
		<div id="header">
			<h1>My Homework</h1>
			<ul id="mainNav">
				<li><a href="__APP__/Index/studentMain" id="home">我的主页</a></li>
				<li><a href="__APP__/Group/myGroup">我的小组</a></li>
				<li><a href="__APP__/Group/allGroups">所有小组</a></li>
				<li><a href="__APP__/Login/logout">退出</a></li>
			</ul>
		</div><!-- end #header -->
 
		<div id="primaryContent">

			<div class="box interviews">
				<h2>我的小组</h2>
				<div class="cbb">
					<div class="cbSide"><h3>组名：</h3><div class="cbb">{$group['name']}</div></div>
					<div class="cbSide">
						
						<h3>组长：</h3>
					
						<div class="cbb">{$leader['name']}</div><br />
						
						<h3>组员：</h3><br/>
						<volist name = "members" id = "vo" key="k">
						<a  href=""><img src="__TMPL__Public/images/may_icon.gif" alt="May" width="38" height="38"/>
						<h3>{$vo['name']}</h3><br/><br/><br/></a>
						</volist>
					</div>
				</div>
			</div>

		</div> <!-- end #primaryContent -->

	<div id="sideContent"> 

		<div class="box">
			<h2>个人信息</h2>
			<div class="cbSide">
				<h3>姓名：</h3><h3>郝雅欣</h3><br/>
				<h3>性别：</h3><h3>女</h3><br/>
				<h3>学院：</h3><h3>软件学院</h3><br/>
				<h3>年级：</h3><h3>2009</h3><br/>
				<h3>学号：</h3><h3>09388252</h3><br/>
			</div>
		</div>
		
		<div id="button">
			
			<br/>
			<button class="buttons join_group_button" group_id="{$group['id']}">加入</button>
			
		</div>

	</div> <!-- end #sideContent -->

	<div id="footer">	  
	</div> <!-- end #footer -->
 
</div><!-- end #wrapper -->

</body>
</html>